<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page import= "java.io.*" %>
<%@ page import= "org.w3c.dom.*" %>
<%@ page import= "javax.xml.parsers.*" %>
<%
File fXmlFile = new File(this.getClass().getClassLoader().getResource("version.xml").getFile().replace("%20"," "));
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(fXmlFile);
%>
<!DOCTYPE html> 
<html> 
	<head> 
	<title>CST</title> 
	<meta name="viewport" content="width=device-width, initial-scale=1"> 
	<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0-beta.1/jquery.mobile-1.2.0-beta.1.min.css" />
	<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
	<script src="http://code.jquery.com/mobile/1.2.0-beta.1/jquery.mobile-1.2.0-beta.1.min.js"></script>
	</head>
	<body> 
	
	
<div data-role="page">
	<div data-role="header">
		<h1>Info</h1>
	</div><!-- /header -->
	<div data-role="content">
			<table>
				<tr>
					<td style="width:40%">Versione :</td>
					<td style="width:60%"><%= doc.getElementsByTagName("version").item(0).getChildNodes().item(0).getNodeValue()%></td>
				</tr>
				<tr>
					<td style="width:40%">Data :</td>
					<td style="width:60%"><%= doc.getElementsByTagName("build-date").item(0).getChildNodes().item(0).getNodeValue()%></td>
				</tr>
				<tr>
					<td style="width:40%">Tipologia :</td>
					<td style="width:60%"><%= doc.getElementsByTagName("app-type").item(0).getChildNodes().item(0).getNodeValue()%></td>
				</tr>
				<tr>
					<td style="width:40%">Descrizione :</td>
					<td style="width:60%"><%= doc.getElementsByTagName("app-description").item(0).getChildNodes().item(0).getNodeValue()%></td>
				</tr>
				<tr>
					<td style="width:40%">Middleware :</td>
					<td style="width:60%"><%= doc.getElementsByTagName("middlewares").item(0).getChildNodes().item(0).getNodeValue()%></td>
				</tr>
				<tr>
					<td style="width:40%">Frameworks :</td>
					<td style="width:60%"><%= doc.getElementsByTagName("frameworks").item(0).getChildNodes().item(0).getNodeValue()%></td>
				</tr>
			</table>	
			<a href="home" data-role="button" data-transition="slidefade">Home</a>
			<a href="j_spring_security_logout" data-role="button" data-ajax="false">Esci</a>
	</div><!-- /content -->
</div><!-- /page -->
</body>
</html>